<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:o="http://openfaces.org/">

	<h:panelGroup rendered="#{rrr == '1'}">
		<h:panelGroup rendered="#{not empty transactionQueryHelper.getSpatialZoneRights(spatialZone)}">
			<rich:dataTable
			style="vertical-align:baseline;"
			value="#{transactionQueryHelper.getSpatialZoneRights(spatialZone)}"
			var="right" rowKeyVar="row" cellspacing="1" rows="13">
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.party']}"/>
					</f:facet>
					<h:outputText value="#{right.party.extParty.name}"/>
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rights.type']}"/>
					</f:facet>
					<h:outputText value="#{messages[right.type.toString()]}" />
				</rich:column>
				<rich:column style="text-align:right;">
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.share']}"/>
					</f:facet>
					<h:outputText value="#{right.share.toString()}"/>
				</rich:column>
	
				<f:facet name="footer">
					<rich:columnGroup>
						<rich:column>#{messages['dataentry.mutate_rrr.total']}</rich:column>
						<rich:column colspan="3" style="text-align:right;">
							--
						</rich:column>
					</rich:columnGroup>
				</f:facet>
			</rich:dataTable>
		</h:panelGroup>
		
		<h:panelGroup rendered="#{empty transactionQueryHelper.getSpatialZoneRights(spatialZone)}">
			<h:outputText value="#{messages['dataentry.mutate_rights.no']}" />
		</h:panelGroup>
	</h:panelGroup>

	<h:panelGroup rendered="#{rrr == '2'}">
		<h:panelGroup rendered="#{not empty transactionQueryHelper.getSpatialZoneRestrictions(spatialZone)}">
			<rich:dataTable
			style="vertical-align:baseline;"
			value="#{transactionQueryHelper.getSpatialZoneRestrictions(spatialZone)}"
			var="restriction" rowKeyVar="row" cellspacing="1" rows="13">
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.party']}"/>
					</f:facet>
					<h:outputText value="#{restriction.party.extParty.name}"/>
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_restrictions.type']}"/>
					</f:facet>
					<h:outputText value="#{messages[restriction.type.toString()]}" />
				</rich:column>
				<rich:column style="text-align:right;">
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.share']}"/>
					</f:facet>
					<h:outputText value="#{restriction.share.toString()}"/>
				</rich:column>

				<f:facet name="footer">
					<rich:columnGroup>
						<rich:column>#{messages['dataentry.mutate_rrr.total']}</rich:column>
						<rich:column colspan="3" style="text-align:right;">
							--
						</rich:column>
					</rich:columnGroup>
				</f:facet>
			</rich:dataTable>
		</h:panelGroup>
		
		<h:panelGroup rendered="#{empty transactionQueryHelper.getSpatialZoneRestrictions(spatialZone)}">
			<h:outputText value="#{messages['dataentry.mutate_restrictions.no']}" />
		</h:panelGroup>
	</h:panelGroup>
	
	<h:panelGroup rendered="#{rrr == '3'}">
		<h:panelGroup rendered="#{not empty transactionQueryHelper.getSpatialZoneResponsibilities(spatialZone)}">
			<rich:dataTable
			style="vertical-align:baseline;"
			value="#{transactionQueryHelper.getSpatialZoneResponsibilities(spatialZone)}"
			var="responsibility" rowKeyVar="row" cellspacing="1" rows="13">
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.party']}"/>
					</f:facet>
					<h:outputText value="#{responsibility.party.extParty.name}"/>
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_responsibilities.type']}"/>
					</f:facet>
					<h:outputText value="#{messages[responsibility.type.toString()]}" />
				</rich:column>
				<rich:column style="text-align:right;">
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.share']}"/>
					</f:facet>
					<h:outputText value="#{responsibility.share.toString()}"/>
				</rich:column>

				<f:facet name="footer">
					<rich:columnGroup>
						<rich:column>#{messages['dataentry.mutate_rrr.total']}</rich:column>
						<rich:column colspan="3" style="text-align:right;">
							--
						</rich:column>
					</rich:columnGroup>
				</f:facet>
			</rich:dataTable>
		</h:panelGroup>
		
		<h:panelGroup rendered="#{empty transactionQueryHelper.getSpatialZoneResponsibilities(spatialZone)}">
			<h:outputText value="#{messages['dataentry.mutate_responsibilities.no']}" />
		</h:panelGroup>
	</h:panelGroup>
</ui:composition>
